package com.stormragetech.sylwanas.util;

import java.io.File;
import java.util.Map;

/**
 * description: //TODO
 *
 * @author: Xue Bin
 * @version: 1.0.0-SNAPSHOT
 */
public class CommonUtils {

    public static void sleep(long mils) {
        try {
            if (mils > 0) {
                Thread.sleep(mils);
            }
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }

    public static String[] filePath(String source) {
        String filePath = source.substring(0, source.lastIndexOf(File.separator));
        String[] target = source.split(File.separator, -1);
        return new String[]{filePath, target[target.length - 1]};
    }

}
